#include <QApplication>
#include <QMainWindow>
#include <QLabel>

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    QMainWindow window;
    window.setWindowTitle("测试窗口");
    window.resize(400, 300);

    QLabel *label = new QLabel("这是一个测试窗口", &window);
    label->setAlignment(Qt::AlignCenter);
    window.setCentralWidget(label);

    window.show();
    window.raise();
    window.activateWindow();

    return app.exec();
}